/*
 * Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package top.continew.admin.controller.zxr;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.continew.admin.zxr.model.query.QyxxbQuery;
import top.continew.admin.zxr.service.QyxxbService;
import top.continew.starter.extension.crud.model.query.SortQuery;
import top.continew.starter.extension.crud.model.resp.LabelValueResp;
import top.continew.starter.log.annotation.Log;

import java.util.List;

/**
 * @Author erhu
 * @Date 2025/5/7 10:46
 * @PackageName:top.continew.admin.controller.zxr
 * @ClassName: CommonController
 * @Description: TODO
 * @Version 1.0
 */
@Tag(name = "业务公共 API")
@Log(ignore = true)
@Validated
@RestController("zxrCommonController")
@RequiredArgsConstructor
@RequestMapping("/zxr/common")
public class CommonController {
    private final QyxxbService qyxxbService;

    /**
     * 企业字典
     */
    @Operation(summary = "查询企业字典", description = "查询企业字典列表")
    @GetMapping("/dict/qyxxb")
    public List<LabelValueResp> listQyxxbDict(QyxxbQuery query, SortQuery sortQuery) {
        return qyxxbService.listDict(query, sortQuery);
    }
}
